home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 858 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: btree.is.brooktree.com!usenet
  2. From: sasha@brooktree.com (Alex Bakaev)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help:  trying to create a DLL in Borland C++ 4.5
  5. Date: Sun, 07 Jan 1996 23:31:05 GMT
  6. Organization: Brooktree Corporation
  7. Message-ID: <4cpl3e$qt8@btree.brooktree.com>
  8. References: <4cmthh$hso@ren.cei.net>
  9. NNTP-Posting-Host: komissar.is.brooktree.com
  10. X-Newsreader: Forte Free Agent v0.46
  11.  
  12. spl@cei.net (Special Agent Orange) wrote:
  13.  
  14. >Hi,
  15.  
  16. >    I am trying to create a DLL in Borland C++ 4.5.  Everything is okay,
  17. >but I always get a linker error: 
  18. >    Linker Warning: Attempt to export non-public symbol GETDISKINFO
  19. >I used the keyword __export in the function definition according to
  20. >the online help examples.  
  21.  
  22. >    Perhaps someone here that is familiar with Borland C++ can send me
  23. >some example source code and .def file.  Thanks for any help...
  24.  
  25. >                    SPL@cei.net
  26.  
  27.  
  28. Are you using .DEF file as well ? Are you including the above function
  29. in the EXPORT section ? If you do the problem might be twofold
  30. 1. you did not use PASCAL modifier for the function - it creates
  31. function name in all capitals and no leading underscore ( among other
  32. things )
  33. 2. you did not use extern "C" - so function name is mangled.
  34.  
  35. As a result you are exporting different symbol.
  36.  
  37.  
  38. Hope this helps, Alex
  39.  
  40.  
  41.